package com.dt.system.service.impl;

import java.util.List;
import com.dt.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dt.system.mapper.ModRepositoriesBoxMapper;
import com.dt.system.domain.ModRepositoriesBox;
import com.dt.system.service.IModRepositoriesBoxService;

@Service
public class ModRepositoriesBoxServiceImpl implements IModRepositoriesBoxService 
{
    @Autowired
    private ModRepositoriesBoxMapper modRepositoriesBoxMapper;

    /**
     * 查询
     * 
     * @param id 主键
     * @return
     */
    @Override
    public ModRepositoriesBox selectModRepositoriesBoxById(Long id)
    {
        return modRepositoriesBoxMapper.selectModRepositoriesBoxById(id);
    }

    /**
     * 查询列表
     * 
     * @param modRepositoriesBox
     * @return
     */
    @Override
    public List<ModRepositoriesBox> selectModRepositoriesBoxList(ModRepositoriesBox modRepositoriesBox)
    {
        return modRepositoriesBoxMapper.selectModRepositoriesBoxList(modRepositoriesBox);
    }

    /**
     * 新增
     * 
     * @param modRepositoriesBox
     * @return 结果
     */
    @Override
    public int insertModRepositoriesBox(ModRepositoriesBox modRepositoriesBox)
    {
        modRepositoriesBox.setCreateTime(DateUtils.getNowDate());
        return modRepositoriesBoxMapper.insertModRepositoriesBox(modRepositoriesBox);
    }

    /**
     * 修改
     * 
     * @param modRepositoriesBox
     * @return 结果
     */
    @Override
    public int updateModRepositoriesBox(ModRepositoriesBox modRepositoriesBox)
    {
        modRepositoriesBox.setUpdateTime(DateUtils.getNowDate());
        return modRepositoriesBoxMapper.updateModRepositoriesBox(modRepositoriesBox);
    }

    /**
     * 批量删除
     * 
     * @param ids 需要删除的主键
     * @return 结果
     */
    @Override
    public int deleteModRepositoriesBoxByIds(Long[] ids)
    {
        return modRepositoriesBoxMapper.deleteModRepositoriesBoxByIds(ids);
    }

    /**
     * 删除信息
     * 
     * @param id 主键
     * @return 结果
     */
    @Override
    public int deleteModRepositoriesBoxById(Long id)
    {
        return modRepositoriesBoxMapper.deleteModRepositoriesBoxById(id);
    }


    /**
     * 批量插入盒子数据
     */
    @Override
    public int batchInsertModRepositoriesBox(List<ModRepositoriesBox> boxList){
        return modRepositoriesBoxMapper.batchInsertModRepositoriesBox(boxList);
    }


}
